#ifndef __MY_GAME_H__
#define __MY_GAME_H__

#include "Header.h"
#include "Core\StateManager.h"

class Game
{
	static Game* m_Instance;
protected:
	bool m_IsPause;
	bool m_IsAlive;
private:
	virtual void Pause();
	virtual void Resume();
	virtual void Exit();
protected:
	Game();
	virtual ~Game();
	virtual void Destroy();
	virtual void Update(__float_);
	virtual void Draw();
public:

	static Game* GetInstance()
	{
		if (!m_Instance)
		{
			m_Instance = new Game();
		}
		return m_Instance;
	}

	static void DestroyInstance()
	{
		if (m_Instance)
			SAFE_DELETE(m_Instance);
	}

	void Touch(POINT, __bool_);

	virtual __int32_ Start();

	virtual void Run(__float_);

#if CURRENT_PLATFORM == WIN
private:
	__bool_ (*m_ViewUpdateFunc)();
public:
	void RegisterViewUpdateFunc(__bool_ (*)());
	void Key(unsigned char, __bool_);
#endif

};

#endif